package org.springframework.security.samples.config.property;

import lombok.Data;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;


@Data
public class SentinelProperties {

    private String master;

    private String nodes;

    public Set<String> hostAndPorts() {
        Set<String> hostAndPorts = new HashSet<>();
        hostAndPorts.addAll(Arrays.asList(nodes.split(",")));
        return hostAndPorts;
    }

}
